<%@ page import="java.util.List,java.io.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form action="SamplePDF" method="post">
	<select name="templateName" id="templateName" style="width:190px;">
				<option value="">Please Select</option>
				<%
				String path = request.getSession().getServletContext().getRealPath("resources");
				File pathFile = new File(path);
				File[] files = pathFile.listFiles();
					for(File templateName : files){
						if(templateName.isDirectory()){
							String name = templateName.getName();
				%>
					<option value="<%=name%>"><%=name%></option>
				<%
						}
				}
				%>
			</select>
<p>
<textarea rows="5" cols="80" name="dataXML"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document>
  <Section description="Outside Front Cover" name="Outside Front Cover">
    <Page description="Entire front page" name="Enrollment Template_s1_p1">
      <Zone type="Text" description="OFCDocumentType" name="Enrollment Template_s1_p1_z3">
		<HTMLBlock name="S3_Z8_P1">PHNwYW4gc3R5bGU9ImZvbnQtZmFtaWx5OiBIZWx2ZXRpY2E7IGZvbnQtc2l6ZTogMTY7IGNvbG9yOiAjNTAxMDU3OyI+V2UndmUgbWFkZSB0aGlzIGFzIGVhc3kgYXMgcG9zc2libGU6PC9zcGFuPg==</HTMLBlock>
      </Zone>
    </Page>
  </Section>
  <Section description="Outside Front Cover" name="Outside Front Cover">
    <Page description="Entire front page" name="Enrollment Template_s1_p1">
      <Zone type="Text" description="OFCDocumentType" name="Enrollment Template_s1_p1_z3">
		<HTMLBlock name="S3_P1_Z10">PGRpdiBzdHlsZT0iZm9udC1mYW1pbHk6IEhlbHZldGljYTsgZm9udC1zdHlsZTpib2xkOyBmb250LXNpemU6IDEyOyBjb2xvcjogIzUwODA1NzsiPlRlc3Qgb3RoZXIgdGFnIGRpdjo8L2Rpdj4KCTxkaXYgc3R5bGU9ImZvbnQtZmFtaWx5OiBIZWx2ZXRpY2E7IGZvbnQtc3R5bGU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x2ZXRpY2E7IGZvbnQtc3R5bGU6Ym9sZDsgZm9udC1zaXplOiA5OyBjb2xvcjogcmVkOyI+VGVzdDwvdGQ+CgkJCTx0ZCB3aWR0aD0iMTAwIiBoZWlnaHQ9IjUwIiBzdHlsZT0iZm9udC1mYW1pbHk6IFZyaW5kYTsgZm9udC1zdHlsZTppdGFsaWM7IGZvbnQtc2l6ZTogOTsgY29sb3I6IGJsdWU7Ij5TZWNvbmQ8L3RkPgoJCQk8dGQgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiBzdHlsZT0iZm9udC1mYW1pbHk6IFZyaW5kYTsgZm9udC1zdHlsZTpub3JtYWw7IGZvbnQtc2l6ZTogOTsgY29sb3I6ICM1MDEwNTc7Ij5PSzwvdGQ+CgkJPC90cj4KCTwvdGFibGU+Cgk8L2Rpdj4=</HTMLBlock>
      </Zone>
    </Page>
  </Section>
 </Document></textarea>
<br />
<!-- 
<textarea rows="5" cols="80" name="S3_P1_Z10">
	
</textarea>
 -->
<br />
<input type="submit" value="Submit"><input type="button" value="Upload Template" onclick="window.location.href='fileupload.jsp'">
<input type="button" value="Update Templates" onclick="window.location.href='editLayout.jsp'">
</form>
</body>
</html>